home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1997 February / macformat-047.iso / Demos / Picasso Interactive Demo / Data / Sequence / Sequence.Dxr / Internal_25.ls < prev    next >
Encoding:
Text File  |  1996-12-02  |  1.7 KB  |  53 lines

  1. on exitFrame
  2.   global gNumVideoSprite, gNumTexteSprite
  3.   if the movieRate of sprite gNumVideoSprite then
  4.     put the movieTime of sprite gNumVideoSprite into field "Tempo"
  5.   end if
  6.   go(the frame)
  7. end
  8.  
  9. on idle
  10.   global gNumVideoSprite, gNumTexteSprite, gListeTimer, gPhraseCourante, gLocCourant, gIndex, gTailleListe
  11.   if the movieTime of sprite gNumVideoSprite = gIndex then
  12.     set nomMembre to "Ang" & gPhraseCourante
  13.     set the castNum of sprite gNumTexteSprite to the number of member nomMembre
  14.     set Largeur to the width of member nomMembre
  15.     set the locH of sprite gNumTexteSprite to (640 - Largeur) / 2
  16.     updateStage()
  17.     if (gPhraseCourante + 1) <= gTailleListe then
  18.       set gPhraseCourante to gPhraseCourante + 1
  19.       set gIndex to getAt(gListeTimer, gPhraseCourante)
  20.     end if
  21.   end if
  22. end
  23.  
  24. on mouseUp
  25.   global gNumVideoSprite, gNumTexteSprite
  26.   if inside(point(the mouseH, the mouseV), the rect of sprite gNumVideoSprite) then
  27.     put the movieTime of sprite gNumVideoSprite into field "Tempo"
  28.   end if
  29. end
  30.  
  31. on keyDown
  32.   global gNumVideoSprite, gNumTexteSprite
  33.   case the keyCode of
  34.     126:
  35.       if value(field "Tempo") < the duration of sprite(gNumVideoSprite) then
  36.         put value(field "Tempo") + 10 into field "Tempo"
  37.       end if
  38.     125:
  39.       if value(field "Tempo") > 0 then
  40.         put value(field "Tempo") - 10 into field "Tempo"
  41.       end if
  42.     124:
  43.       if value(field "Tempo") < the duration of sprite(gNumVideoSprite) then
  44.         put value(field "Tempo") + 1 into field "Tempo"
  45.       end if
  46.     123:
  47.       if value(field "Tempo") > 0 then
  48.         put value(field "Tempo") - 1 into field "Tempo"
  49.       end if
  50.   end case
  51.   set the movieTime of sprite gNumVideoSprite to value(field "Tempo")
  52. end
  53.